<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html>
<head>
<title>用户登陆 - IT答案网</title>
<meta name="keywords" content="用户注册" />
<meta name="description" content="用户注册" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="${path }/css/all.css" rel="stylesheet">
<link href="${path }/css/prettify.css" rel="stylesheet">
<script type="text/javascript">
   function validate(){
	    var userName = $("input[name='username']");
	    var userNameInfo = $(".userNameInfo");
	    var userPwd = $("input[name='password']");
	    var userPwdInfo = $(".userPwdInfo");
	    if(!userName.val()){
	    	userName.parent().addClass("error");
	    	userName.focus();
	    	userNameInfo.text("账号不能为空");
	    	return false;
	    }
	    if(!userPwd.val()){
	    	userPwd.parent().addClass("error");
	    	userPwd.focus();
	    	userPwdInfo.text("密码不能为空");
	    	return false;
	    }
	    return true;
   }
</script>
</head>
<body>
  <jsp:include page="head.jsp"></jsp:include>
  <div class="container container1000">
  <div class="row-fluid" style="margin-bottom:20px;">
      <div class="offset3 span6">
       <c:if test="${loginerror != null }">
       <div class="alert alert-error">
             <button data-dismiss="alert" class="close" type="button">×</button>
             <strong>登陆失败：</strong> ${loginerror }
	    </div>
	    </c:if>
       <form class="form-signin" action="${path }/user/login" method="post" onsubmit="return validate();">
        <h2 class="form-signin-heading">账号登陆</h2>
        <div class="control-group"><input type="text" class="input-block-level span8" placeholder="账号" name="username"><span class="userNameInfo help-inline"></span></div>
        <div class="control-group"><input type="password" class="input-block-level span8" placeholder="密码" name="password"><span class="userPwdInfo help-inline"></span></div>
                           使用合作账号免注册登陆
					<a href="${path}/user/beforeLogin4qq">
						<img alt="使用qq登陆" title="使用qq登陆" src="${path }/img/qq30.png" width="30" height="30"/>
					</a>
					<button class="btn btn-success" type="submit">登陆</button>
      </form>
     </div> 
    </div> 
  </div>
  <div class="clear">&nbsp;</div>
   
  <jsp:include page="bottom.jsp"></jsp:include>  
</body>
</html>